// ignore: file_names
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

class CustomToast {
  // 正常的消息提示
  static void show(String message) {
    // 显示消息提示
    Fluttertoast.showToast(
        msg: message,
        toastLength: Toast.LENGTH_SHORT,
        gravity: ToastGravity.BOTTOM,
        backgroundColor: Color.fromARGB(255, 85, 145, 175),
        textColor: Colors.white,
        webPosition: 'center',
        webBgColor: '#0000ff');
  }
  // 成功的消息提示

  static void success(String message) {
    // 显示消息提示
    Fluttertoast.showToast(
        msg: message,
        toastLength: Toast.LENGTH_SHORT,
        gravity: ToastGravity.BOTTOM,
        backgroundColor: Colors.green,
        textColor: Colors.white,
        webPosition: 'center',
        webBgColor: '#5591af');
  }
  // 失败的消息提示
  static void error(String message) {
    Fluttertoast.showToast(
        msg: message,
        toastLength: Toast.LENGTH_SHORT,
        gravity: ToastGravity.BOTTOM,
        backgroundColor: Colors.blue,
        textColor: Colors.white,
        webPosition: 'center',
        webBgColor: '#0000ff');
  }
}
